Lesson 0008 · ~12 min

Layers, residuals, and MLPs

Core idea: A transformer is a stack of layers, each combining attention, per-token computation, and residual updates.

What to remember

Why it matters

Depth lets the model build progressively more abstract and useful representations.

Mental model

Each layer says: gather relevant context, process it, then add a learned adjustment to what you already had.

Checkpoint

  1. Why use multiple layers?
  2. What does a residual connection do in plain English?
  3. How do attention and the MLP differ?